Computer programs often need to share information contained in data structures. Various interchange formats have been developed to provide a means to share information stored in data structures. One widely utilized format is ASN.1, developed as formal notation for describing data transmitted by telecommunications protocols, regardless of language implementation and physical representation of these data, whatever the application, whether complex or very simple.
ASN.1 sends information in any form (audio, video, data, etc.) anywhere it needs to be communicated digitally. ASN.1 only covers the structural aspects of information and is not a programming language.
Typed, structured interchange format data (e.g., ASN.1 encoded data) is usually encoded and decoded using a library of functions. Each time a message is sent it must be ASN.1-encoded by the sender and decoded at the receiver.
In the most general sense, the sender is the program that needs to encode data into the shared data format and the receiver is the program that needs to decode the data in the shared data format.
Each library function knows how to encode/decode a particular object. The library functions are assembled into a program, either by hand or by a compiler, that represents the structure of the data to be dealt with, which reads the structure definition, and produces a program from it.
The problems with this are:
Modifying the encoding or decoding (for example, adding a new object in the data structure) requires a recompile. Additionally, the use of library functions results in a lot of code, which takes up a lot of space.
Doing ASN.1 by hand requires significant knowledge of both ASN.1 and the library functions that deal with the objects. Using a compiler often requires some hand-tweaking, which requires knowledge of the ASN.1 compiler vendor's library functions that deal with the objects.
Accordingly, the industry needs efficient techniques for decoding between interchange format data and data structures.